package com.bharat.services;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.bharat.dao.ITestDao;
import com.bharat.domain.Test;

public class TestService {

	private ITestDao testDao;
	
	public void setTestDao(ITestDao testDao) {
		this.testDao = testDao;
	}
	
	@Transactional
	public int createTest(Test test){
		int status = testDao.createTest(test);
		return status;
	}
	
	@Transactional
	public int updateTest(Test test){
		int status = testDao.updateTest(test);
		return status;
	}
	
	@Transactional
	public List<Test> getAllTests(){
		return testDao.getAllTests();
	}
	
	@Transactional
	public int deleteTest(Test test) {
		return testDao.deleteTest(test);
	}
}
